<div class="panel panel-default panel-intro">{:build_heading()}
    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="one">
                <div class="widget-body no-padding">
                    <div class="bootstrap-table">
                        <div class="fixed-table-toolbar">
                            <div class="bs-bars pull-left">
                                <div id="toolbar" class="toolbar" style="position: relative;">
                                    <a href="javascript:;" class="btn btn-primary btn-refresh" title="刷新">
                                        <i class="fa fa-refresh"></i>
                                    </a>
                                    <a href="{:url('Xiangmu/edits')}" class="btn btn-success btn-add" title="添加">
                                        <i class="fa fa-plus"></i>添加</a>
                                </div>
                            </div>

                        </div>
                        <div class="fixed-table-container" style="padding-bottom: 0px;">
                            <div class="fixed-table-body">
                                <table id="table" class="table table-striped table-bordered table-hover" width="100%">
                                    <thead>
                                        <tr>
                                            <th style="text-align: center; vertical-align: middle; ">
                                                <div class="th-inner ">编号</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; vertical-align: middle; ">
                                                <div class="th-inner ">项目名称</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; vertical-align: middle; ">
                                                <div class="th-inner ">录入人员</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; vertical-align: middle; ">
                                                <div class="th-inner ">状态</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; vertical-align: middle; ">
                                                <div class="th-inner ">录入时间</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; vertical-align: middle; ">
                                                <div class="th-inner ">操作</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                        </tr>
                                    </thead>
                                    <tbody data-listidx="0">
                                    {volist name="list" id="vo"}
                                      {php}
                                        $admin=db('admin')->where('id', $vo['uid'])->find();
                                      {/php}
                                        <tr data-index="0">
                                            <td style="text-align: center; vertical-align: middle;">
                                                {$vo.number}
                                            </td>
                                            <td style="text-align: center; vertical-align: middle;">
                                                {$vo.name}
                                            </td>
                                            <td style="text-align: center; vertical-align: middle;">
                                              {$admin.nickname}
                                            </td>
                                            <td style="text-align: center; vertical-align: middle;">
                                                {if condition="$vo['status'] eq 1"}
                                                  已处理
                                                {else/}
                                                  未处理
                                                {/if}
                                            </td>
                                            <td style="text-align: center; vertical-align: middle;">
                                                {:date('Y-m-d',$vo['time'])}
                                            </td>
                                            <td style="text-align: center; vertical-align: middle;">
                                                <a href="{:url('Xiangmu/edits',['id'=>$vo['id']])}" class="btn btn-xs btn-success">
                                                    修改
                                                </a>
                                                <a href="{:url('Xiangmu/delete',['id'=>$vo['id']])}" class="btn btn-xs btn-danger">
                                                    删除
                                                </a>
                                            <!--    <a href="javascript:;" class="btn btn-xs btn-success">
                                                    项目预览
                                                </a>-->
                                                <a href="javascript:" class="btn btn-xs btn-success" onclick="setting({$vo['id']})">
                                                    配置报价表
                                                </a>
                                             	 <a href="{:url('Ziyuan/zedit',['pro_id'=>$vo['id']])}" class="btn btn-xs  btn-success">
                                                    资源上传
                                                </a>
                                               <a href="{:url('Ziyuan/zlist',['pro_id'=>$vo['id']])}" class="btn btn-xs  btn-success">
                                                    资源查看
                                                </a>
                                            </td>
                                        </tr>
                                    {/volist}
                                    </tbody>
                                </table>
                            </div>
                            <div class="fixed-table-pagination" style="display: block;">
                                {$list->render()}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
   function setting(id) {
       $.ajax({
           type:'POST',
           data:{id:id},
           url:"{:url('setting')}",
           traditional: true,
           success:function(data){
               if(data.code==1){
                   localStorage.setItem('project_id',id);
                   var info=data.data.info;
                   if(data.data.info){
                       localStorage.setItem('develop_model',info.develop_model);
                       localStorage.setItem('list',info.info_str);
                       if(info.develop_model==1){
                           top.location="http://baojianew2.sofunla.com/index.html#/quote/step3type2";
                       }else{
                           top.location="http://baojianew2.sofunla.com/index.html#/quote/step3";
                       }
                   }else{
                       top.location="http://baojianew2.sofunla.com/index.html#/quote/step1";
                   }
               }else{
                   alert(data.msg);
               }
           }
       });
   }

</script>